package com.example.service.impl;

import com.example.dao.OrderdetailDao;
import com.example.entity.Orderdetail;
import com.example.service.OrderdetailService;

import javax.annotation.Resource;
import java.util.ArrayList;

public class OrderdetailSweviceimpl implements OrderdetailService {

    @Resource
    OrderdetailDao orderdetailDao;
    @Override
    public ArrayList<Orderdetail> queryAll() { return orderdetailDao.queryAll(); }

    @Override
    public int deleteByID(Integer id) {
        return orderdetailDao.delectById(id);
    }

    @Override
    public Orderdetail findById(Integer id) {
        return orderdetailDao.findByid(id);
    }

    @Override
    public int update(Orderdetail orderdetail) {
        return orderdetailDao.update(orderdetail);
    }

    @Override
    public int insert(Orderdetail orderdetail) {
        return orderdetailDao.insert(orderdetail);
    }
}
